using Simple.Contracts.Models.Common.Page;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Contracts.Models
{
    /// <summary>
    /// 角色Dto
    /// </summary>
    public class RoleDto
    {
        /// <summary>
        /// 角色Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 公司Id
        /// </summary>
        public long CompanyId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }

    /// <summary>
    /// 角色列表输入
    /// </summary>
    public class RoleListInput 
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        public string? Name { get; set; }
    }

    /// <summary>
    /// 角色保存输入
    /// </summary>
    public class RoleSaveInput
    {
        /// <summary>
        /// 角色Id
        /// </summary>
        public int? Id { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 半选中的角色权限
        /// </summary>
        public List<int>? halfSelectedPermissionIds { get; set; }

        /// <summary>
        /// 全选中的角色权限
        /// </summary>
        public List<int>? selectAllPermissionIds { get; set; }
    }

    /// <summary>
    /// 角色删除输入
    /// </summary>
    public class RoleDeleteInput
    {
        /// <summary>
        /// 角色Id列表
        /// </summary>
        public List<long> Ids { get; set; }
    }

    /// <summary>
    /// 权限Dto
    /// </summary>
    public class PermissionDto
    {
        /// <summary>
        /// 权限Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 权限类型
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 父级权限Id
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 子权限
        /// </summary>
        public List<PermissionDto> Children { get; set; }

        /// <summary>
        /// 是否选中
        /// </summary>
        public bool Checked { get; set; }

        /// <summary>
        /// 是否半选中
        /// </summary>
        public bool Indeterminate { get; set; }
    }

    /// <summary>
    /// 设置角色权限输入
    /// </summary>
    public class RoleSetPermissionInput
    {
        /// <summary>
        /// 角色Id
        /// </summary>
        public int RoleId { get; set; }

        /// <summary>
        /// 权限Id列表
        /// </summary>
        public List<int> PermissionIds { get; set; }
    }
}